package com.sunwayhorizo.health.hl7.rim;

import com.sunwayhorizo.health.common.*;
import com.sunwayhorizo.health.hl7.common.*;
import com.sunwayhorizo.health.hl7.datatypes.*;
import com.sunwayhorizo.health.hl7.factories.*;
import java.io.*;
import java.sql.Timestamp;
import javax.persistence.*;
import org.jboss.seam.annotations.*;

@Name("LicensedEntity")
@Entity
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("LIC")
public class LicensedEntity extends Role implements Serializable {
    
//    public TS RecertificationTime;
    
    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    public LicensedEntity() {
    }
    
    public LicensedEntity(ReferenceModifier referencemodifier)
    {
    
        super( referencemodifier);
    }


    public void setRecertificationTime(TS RecertificationTime) {
        this.setLeRecertDateTs(new Timestamp( RecertificationTime.toDate().getTime()));
        this.setLeRecertDateTxt(RecertificationTime.literal().toString());
    }

    public TS getRecertificationTime() throws Hl7Exception {
        return DataTypeUtil.getTS(this.getLeRecertDateTs());
    }
    
    @Column(name = "LE_RECERT_DATE_TS")    private Timestamp leRecertDateTs;
    @Column(name = "LE_RECERT_DATE_TXT")    private String leRecertDateTxt;
    
    private Timestamp getLeRecertDateTs() {
        return leRecertDateTs;
    }

    private void setLeRecertDateTs(Timestamp leRecertDateTs) {
        this.leRecertDateTs = leRecertDateTs;
    }

    @SuppressWarnings("unused")
    private String getLeRecertDateTxt() {
        return leRecertDateTxt;
    }

    private void setLeRecertDateTxt(String leRecertDateTxt) {
        this.leRecertDateTxt = leRecertDateTxt;
    }


}
